package com.zzyl.controller.customer;

import com.zzyl.base.PageResponse;
import com.zzyl.base.ResponseResult;
import com.zzyl.controller.BaseController;
import com.zzyl.service.CustomerOrdersProjectService;
import com.zzyl.vo.NursingServiceVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.annotations.Insert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Api(tags = "服务项接口")
@RestController
@RequestMapping("/customer/orders/project")
public class CustomerOrdersProjectController extends BaseController {
    @Autowired
    private CustomerOrdersProjectService customerOrdersProjectService;
    @GetMapping("/page")
    @ApiOperation("服务端查询护理项目")
    public ResponseResult getList(String name, @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize ,@RequestParam(value = "pageNum",defaultValue = "1") Integer pageNum, Integer status){
      PageResponse<NursingServiceVo> vo = customerOrdersProjectService.getList(name,pageSize,pageNum,status);
      return success(vo);
    }

    @ApiOperation("服务端根据ID查询")
    @GetMapping("/{id}")
    public ResponseResult getById(@PathVariable Integer id){
        NursingServiceVo vo =   customerOrdersProjectService.getById(id);
        return success(vo);
    }


}
